#pragma once
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
#include <cppunit/config/SourcePrefix.h>
#include <cppunit/extensions/HelperMacros.h>

#include <iostream>
#include <sstream>

using namespace std;

int main(int argc, char* argv[]) {
// Get the top level suite from the registry

CppUnit::TestSuite *integrationSuite = new CppUnit::TestSuite( "All integration test" );
integrationSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("Parser_ASTTest").makeTest());		
integrationSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("Parser_ModifiesTest").makeTest());
integrationSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("Parser_UsesTest").makeTest());
integrationSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("Parser_VarTableTest").makeTest());
integrationSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("Parser_StmtTableTest").makeTest());
integrationSuite->addTest(CppUnit::TestFactoryRegistry::getRegistry("QueryPreProcessor_QueryEvaluatorTest").makeTest());
CppUnit::TestFactoryRegistry::getRegistry().addTestToSuite(integrationSuite);

CppUnit::TextUi::TestRunner runner;


runner.addTest(integrationSuite);
bool wasSucessful = runner.run();

system("PAUSE");

return wasSucessful ? 0 : 1;
}